package modelo.reglas.composite;

import modelo.reglas.CompositeSpecification;
import modelo.reglas.ISpecification;
import modelo.reglas.Specificable;

public class NotSpecification<T extends Specificable> extends
		CompositeSpecification<T> {

	private ISpecification<T> wrapped;

	public NotSpecification(ISpecification<T> x) {
		wrapped = x;
	}

	public Boolean isSatisfiedBy(T candidate) {
		return !wrapped.isSatisfiedBy(candidate);
	}
}
